# Contributor: Vladimir Luzan <vluzan@disroot.org>
# Maintainer: Vladimir Luzan <vluzan@disroot.org>
pkgname=qt5ct
pkgver=1.7
pkgrel=0
pkgdesc="Qt5 configuration tool"
url="https://sourceforge.net/projects/qt5ct/"
arch="all"
license="BSD-2-Clause"
makedepends="cmake qt5-qtbase-dev qt5-qttools-dev samurai"
subpackages="$pkgname-dev"
source="https://sourceforge.net/projects/qt5ct/files/qt5ct-$pkgver.tar.bz2"
options="!check" # no tests

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_BUILD_TYPE=None \
		$CMAKE_CROSSOPTS .
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
97f1afc137e750abbb8c4e442cb6e09d2aa0c4979de2117ea644d484e1f7489bec144332814aae961bfaa5f8ac9ddf027c7a665274a65aef26fc4bf7c45610c0  qt5ct-1.7.tar.bz2
"
